package de.wiroo.setup.web.common;

import org.apache.wicket.util.io.IClusterable;

public interface IAction<R, P> extends IClusterable{
	
	/**
	 * The unique identifier for the action. (Uniqueness in the context of the entity is sufficient.)
	 */
	String getActionId();

	/**
	 * 
	 * @param model the model
	 * @return whether the action is enabled in the current context and for the given model.
	 */
	boolean isEnabled(P param);

	/**
	 * Executes the action for the given model.
	 * @param model
	 */
	R execute(P param);

	/**
	 * 
	 * @return whether the action needs additional confirmation by the user.
	 */
	boolean needsConfirmation();
	

}